<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{dede:field name='typeid' runphp='yes'}
		global $dsql;
		$typeid = @me;
		$query = "SELECT topid, content FROM dede_arctype where id = $typeid";
		$rs = $dsql->GetOne($query);
		$cur_id = $rs['topid'];
		
		if(0 == $cur_id){
			$web_title = $rs['content'];
		} else {
			$query = "SELECT content FROM dede_arctype where id = $cur_id";
			$rs = $dsql->GetOne($query);
			$web_title = $rs['content'];
		}
		
		@me = trim(html2text($web_title));
		{/dede:field} - {dede:global.cfg_webname/}</title>
<meta name="description" content="{dede:global.cfg_description/}" />
<meta name="keywords" content="{dede:global.cfg_keywords/}" />
<link href="{dede:global.cfg_templets_skin/}/res/base.css" rel="stylesheet" media="screen" type="text/css" />
<link href="{dede:global.cfg_templets_skin/}/res/main.css" rel="stylesheet" media="screen" type="text/css" />
<script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.5.2/jquery.min.js"></script>
</head>
<body>
<div id="main"> {dede:include filename="m__head.htm"/}
  <div style="margin:12px auto 0;" class="box"> {dede:include filename="m__left_index.htm"/}
    <div class="boxright">
      <div class="recommend"> <b></b>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '最新产品'";
	$row = $dsql->GetOne($query);
	$link = GetTypeUrl($row['typeid'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);
	@me = "<a href='{$link}' class='more' target='_blank'>更多推荐&gt;&gt;</a>";
{/dede:field}       
        <ul>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '最新产品'";
	$row = $dsql->GetOne($query);
	$type_id = $row['id'];	
	
	$query2 = " select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault, 
				tp.defaultname,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath 
				from dede_archives arc left join dede_arctype tp on arc.typeid=tp.id where arc.typeid = $type_id and find_in_set('c',arc.flag) and find_in_set('p',arc.flag) order by arc.pubdate desc limit 0, 3";
	$dsql->Execute('me',$query2);
	
	$s = '';
	while ($row = $dsql->GetArray('me')) {
		$title = $row['title'];
		$litpic = $row['litpic'];
		$link =  GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']); 
        $s .= "<li><table><tbody><tr><td><a title='$title' target='_blank' href='{$link}'><img width='100' border='0' onload='100&lt;=this.width?this.width=100:this.width;100&lt;=this.height?this.height=100:this.height' alt='$title' src='{$litpic}' /></a></td></tr></tbody></table><p><a title='$title' target='_blank' href='{$link}'>$title</a></p></li>";
	}
	
	@me = $s;
{/dede:field}          
        </ul>
      </div>
      <div class="rightboxtitle"> <b>New products</b>
        <h3>最新产品</h3>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '最新产品'";
	$row = $dsql->GetOne($query);
	$link = GetTypeUrl($row['typeid'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);
	@me = "<a href='{$link}' class='more' target='_blank'>更多新品&gt;&gt;</a>";
{/dede:field} 
       </div>
      <ul class="newproduct">
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '最新产品'";
	$row = $dsql->GetOne($query);
	$type_id = $row['id'];	
	
	$query2 = " select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault, 
				tp.defaultname,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath 
				from dede_archives arc left join dede_arctype tp on arc.typeid=tp.id where arc.typeid = $type_id and find_in_set('p',arc.flag) order by arc.pubdate desc limit 0, 8";
	$dsql->Execute('me',$query2);
	
	$s = '';
	while ($row = $dsql->GetArray('me')) {
		$title = $row['title'];
		$litpic = $row['litpic'];
		$link =  GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']); 
        $s .= "<li><table><tbody><tr><td><a title='$title' target='_blank' href='{$link}'><img width='100' border='0' onload='100&lt;=this.width?this.width=100:this.width;100&lt;=this.height?this.height=100:this.height' alt='$title' src='{$litpic}' /></a></td></tr></tbody></table><p><a title='$title' target='_blank' href='{$link}'>$title</a></p></li>";
	}
	
	@me = $s;
{/dede:field}       
      </ul>
      <div class="rightsupply">
        <h3>热门供应</h3>
        <b></b>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '热门供应'";
	$row = $dsql->GetOne($query);
	$link = GetTypeUrl($row['typeid'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);
	@me = "<a href='{$link}' class='more' target='_blank'>更多&gt;&gt;</a>";
{/dede:field} 
      </div>
      <dl class="supplylist">
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '热门供应'";
	$row = $dsql->GetOne($query);
	$type_id = $row['id'];	
	
	$query2 = " select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault, 
				tp.defaultname,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath 
				from dede_archives arc left join dede_arctype tp on arc.typeid=tp.id where arc.typeid = $type_id order by arc.pubdate desc limit 0, 10";
	$dsql->Execute('me',$query2);
	
	$s = '';
	while ($row = $dsql->GetArray('me')) {
		$title = $row['title'];
		$pubdate = date("m-d",$row['pubdate']); 
		$link =  GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']); 
        $s .= "<dt><a class='slist' href='javascript:void(0);'>[供]</a><a title='$title' href='{$link}' target='_blank'>$title</a></dt><dd>$pubdate</dd>";
	}
	
	@me = $s;
{/dede:field} 
      </dl>
      <div class="rightnews">
        <div class="rightnewsbox">
          <div class="rightnewstop">
            <h3>公司新闻</h3>
            <b></b>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '公司新闻'";
	$row = $dsql->GetOne($query);
	$link = GetTypeUrl($row['typeid'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);
	@me = "<a href='{$link}' class='more' target='_blank'>更多&gt;&gt;</a>";
{/dede:field}             
          </div>
          <ul>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '公司新闻'";
	$row = $dsql->GetOne($query);
	$type_id = $row['id'];
	
	$query2 = " select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault, 
				tp.defaultname,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath 
				from dede_archives arc left join dede_arctype tp on arc.typeid=tp.id where arc.typeid = $type_id order by arc.pubdate desc limit 0, 10";
	$dsql->Execute('me',$query2);
	
	$s = '';
	while ($row = $dsql->GetArray('me')) {
		$title = $row['title'];
		$link =  GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']); 
        $s .= "<li><a title='$title' href='{$link}' target='_blank'>$title</a></li>";
	}
	@me = $s;	
{/dede:field}           
          </ul>
        </div>
        <div style="border:none;" class="rightnewsbox">
          <div class="rightnewstop">
            <h3>技术文章</h3>
            <b></b>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '技术文章'";
	$row = $dsql->GetOne($query);
	$link = GetTypeUrl($row['typeid'],MfTypedir($row['typedir']),$row['isdefault'],$row['defaultname'],$row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);
	@me = "<a href='{$link}' class='more' target='_blank'>更多&gt;&gt;</a>";
{/dede:field}
          </div>
          <ul>
{dede:field name='typeid' runphp='yes'}
	global $dsql;
	$typeid = @me;
	$query = "SELECT * FROM dede_arctype where reid = $typeid and typename = '技术文章'";
	$row = $dsql->GetOne($query);
	$type_id = $row['id'];
	
	$query2 = " select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault, 
				tp.defaultname,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath 
				from dede_archives arc left join dede_arctype tp on arc.typeid=tp.id where arc.typeid = $type_id order by arc.pubdate desc limit 0, 10";
	$dsql->Execute('me',$query2);
	
	$s = '';
	while ($row = $dsql->GetArray('me')) {
		$title = $row['title'];
		$link =  GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']); 
        $s .= "<li><a title='$title' href='{$link}' target='_blank'>$title</a></li>";
	}
	@me = $s;	
{/dede:field}           
          </ul>
        </div>
        <br class="clear">
      </div>
    </div>
    <br class="clear">
  </div>
  <br class="clear">
</div>
{dede:include filename="m__footer.htm"/}
</body>
</html>
